﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cofe.Core.Implements;
using Cofe.Core.Interfaces;
using Cofe.Core.Property;

namespace Cofe.Core
{
    public static class IVolumeRegistrarBehaviorManagerExtension
    {
        //public static IEnumerable<IPropertyHost> GetRootPropertyHosts(this IVolumeRegistrarBehaviorManager manager)
        //{
        //    return manager.GetRootBehavior.GetRootPropertyHosts();
        //}

        //public static IEnumerable<ICofeDirectoryInfo> GetRootDirectories(this IVolumeRegistrarBehaviorManager manager)
        //{
        //    return manager.GetRootBehavior.GetRootDirectories();
        //}

        public static void NotifyAdded(this IVolumeRegistrarBehaviorManager manager, IVolume volume)
        {
            foreach (var vcb in manager.VolumeChangedBehaviors)
                vcb.NotifyAdded(volume);
        }

        public static void NotifyRemoved(this IVolumeRegistrarBehaviorManager manager, IVolume volume)
        {
            foreach (var vcb in manager.VolumeChangedBehaviors)
                vcb.NotifyRemoved(volume);
        }

    }
}
